import java.util.*;

public class Main{
    public static void main(String[] args){
        HashSet<Character> set = new HashSet<>();
        HashSet<Character> set2 = new HashSet<>();

        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String t = scanner.nextLine();
        s = s.toUpperCase();
        t = t.toUpperCase();
        for (int i = 0; i < s.length(); i++) {
            set.add(s.charAt(i));
        }
        for (int i = 0; i < t.length(); i++) {
            set2.add(t.charAt(i));
        }

        HashMap<Character,Integer> set3 = new HashMap<>();
        for (int i = 0; i < s.length(); i++) {
            if(!set2.contains(s.charAt(i))){
                set3.put(s.charAt(i),0);
            }
        }

        System.out.print(set3.toString());
    }

}